﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace imaginecup.information
{
    public class GObjectID
    {
        public int ID;

        private static int GeneratorIDCount;

        public static void InitGenerator()
        {
            GeneratorIDCount = 0;
        }

        public GObjectID()
        {
            ID = GeneratorIDCount;
            GeneratorIDCount++;
        }

        public override bool Equals(object a_Obj)
        {
            GObjectID a_GObjectID = (GObjectID)a_Obj;

            if(this.ID == a_GObjectID.ID)
                return true;
            return false;
        }

        public override int GetHashCode()
        {
            return ID;
            //return base.GetHashCode();
        }
    }
}
